<?php

class feeds_model extends CI_Model {

    function __construct()
    {
        parent::__construct();
    }

    function get_count($merchant_id,$search="")
    {
        $this->db->select('*');
        $this->db->from('feeds');
        $this->db->where('merchant_id',$merchant_id);
        $query = $this->db->get();

        return $query->num_rows();;
        
    }
    function get_feed_data($merchant_id,$limit,$offset,$search="")
    {
		$this->db->select('*');
        $this->db->from('feeds');
        $this->db->where('merchant_id',$merchant_id);
        $this->db->limit($limit, $offset);
        $query = $this->db->get();
        
        return $query->result_array();
		
    }

    

}